Minor fix for GTK+ mediaLib code.
authorBrian Cameron <Brian.Cameron@sun.com>
Wed, 29 Apr 2009 23:52:32 +0000 (18:52 -0500)
committerBrian Cameron <Brian.Cameron@sun.com>
Wed, 29 Apr 2009 23:52:32 +0000 (18:52 -0500)
After doing some performance analysis, it was found that the GTK+ mediaLib code
triggers unnecessary lazy loading of dependent libraries.  The current code
uses RTLD_DEFAULT, RTLD_PROBE, RTLD_NEXT, and RTLD_SELF.  However, RTLD_PROBE
is all that is necessary, and avoids triggering the lazy loading.  So this
commit fixes the code to just use RTLD_PROBE.  (Bug 580678)

gdk-pixbuf/pixops/pixops.c
gdk/gdkmedialib.c

index 3d01edaf2adbaabd1cad7c5db3be87d8b14758cd..513d16fc8bfce967a31b1b6cc867293a5e8b5579 100644 (file)
@@ -217,10 +217,7 @@ _pixops_use_medialib ()
            * For x86 processors use of libumem conflicts with
            * mediaLib, so avoid using it.
            */
-          if ((dlsym (RTLD_DEFAULT, "umem_alloc") != NULL) ||
-              (dlsym (RTLD_PROBE,   "umem_alloc") != NULL) ||
-              (dlsym (RTLD_NEXT,    "umem_alloc") != NULL) ||
-              (dlsym (RTLD_SELF,    "umem_alloc") != NULL))
+          if (dlsym (RTLD_PROBE,   "umem_alloc") != NULL)
             {
               use_medialib = FALSE;
               return;
index 0a2301208f3306597ff0e54fc902c930fa02b344..effb89dd857e59911c6c05157e26744398648028 100644 (file)
@@ -104,10 +104,7 @@ _gdk_use_medialib (void)
             * For x86 processors use of libumem conflicts with
             * mediaLib, so avoid using it.
             */
-           if ((dlsym (RTLD_DEFAULT, "umem_alloc") != NULL) ||
-               (dlsym (RTLD_PROBE,   "umem_alloc") != NULL) ||
-               (dlsym (RTLD_NEXT,    "umem_alloc") != NULL) ||
-               (dlsym (RTLD_SELF,    "umem_alloc") != NULL))
+           if (dlsym (RTLD_PROBE,   "umem_alloc") != NULL)
              {
                return FALSE;
              }